﻿@model NK.Mvc3.Models.SaleDetail
<div class="gridrow" id="gridrow-@Model.ID">
    <div class="gridcell">
         @Html.DisplayFor(modelItem => Model.ProductInfo.BarCode)   
    </div>
    <div class="gridcell text">
        @Html.DisplayFor(modelItem => Model.ProductInfo.POSDescription) 
    </div>
    <div class="gridcell num">
        @Html.DisplayFor(modelItem => Model.Quantity) 
    </div>
    <div class="gridcell money">
        @Html.DisplayFor(modelItem => Model.CostSale) 
    </div>
    <div class="gridcell money">
        @Html.DisplayFor(modelItem => Model.TotalCost) 
    </div>  
    <div class="gridcell action">
        @Ajax.ActionLink("Edit", "EditDetail", "SaleAjax", new { id = Model.ID }, new AjaxOptions
        {
            UpdateTargetId = "gridrow-" + Model.ID,
            HttpMethod = "GET",
            InsertionMode = InsertionMode.Replace,
            OnSuccess = "insertUpdate"
        })|
        @Ajax.ActionLink("Delete", "DeleteDetail", "SaleAjax", new { id = Model.ID }, new AjaxOptions
                                                                {
                                                                    UpdateTargetId = "gridrow-" + Model.ID,
                                                                    HttpMethod = "GET",
                                                                    InsertionMode = InsertionMode.Replace,
                                                                    Confirm = "Confirm deleting: " + (Model.ProductInfo!=null?Model.ProductInfo.POSDescription:string.Empty)
                                                                })
    </div>
</div>